<?php
/* @var $this SiteController */

if (Yii::app()->session["user_id"] == null) {
    $this->redirect(array("site/index"));
}
$this->pageTitle = Yii::app()->name;
?>
<?php $form = $this->beginWidget('CActiveForm', array()); ?>
<div class="panel panel-primary">
    <div class="panel-heading">
        <h3 class="panel-title">
            <span class="glyphicon glyphicon-arrow-right"></span></span> Add Poll <span
                class="glyphicon glyphicon-new-window"></span></a>
        </h3>
    </div>
    <div class="panel-body">
        <ul class="list-group">
            <li class="list-group-item">           
                <div align="left">
                    <?php  echo CHtml::label("คำถาม : ", "") ?>
                    <?php echo $form->textField($questions, "ques_name", array(
                        'size' => '100'
                    )); ?>  
                </div>
            </li>
            <li class="list-group-item">           
                <div align="left">
                    <?php  echo CHtml::label("คำตอบที่ 1 : ", "") ?>
                    <?php echo $form->textField($choice, "choice1", array(
                        'size' => '50'
                    )); ?>  
                </div>
            </li>
            <li class="list-group-item">           
                <div align="left">
                    <?php  echo CHtml::label("คำตอบที่ 2 : ", "") ?>
                    <?php echo $form->textField($choice, "choice2", array(
                        'size' => '50'
                    )); ?>  
                </div>
            </li>
            <li class="list-group-item">           
                <div align="left">
                    <?php  echo CHtml::label("คำตอบที่ 3 : ", "") ?>
                    <?php echo $form->textField($choice, "choice3", array(
                        'size' => '50'
                    )); ?>  
                </div>
            </li>
            <li class="list-group-item">           
                <div align="left">
                    <?php  echo CHtml::label("คำตอบที่ 4 : ", "") ?>
                    <?php echo $form->textField($choice, "choice4", array(
                        'size' => '50'
                    )); ?>  
                </div>
            </li>
            <li class="list-group-item">           
                <div align="left">
                    <?php  echo CHtml::label("คำตอบที่ 5 : ", "") ?>
                    <?php echo $form->textField($choice, "choice5", array(
                        'size' => '50'
                    )); ?>  
                </div>
            </li>
        
            <div class="panel-footer">
                <input type="submit" value="บันทึก" >

            </div>


            <?php $this->endWidget(); ?>
        </ul>
    </div>
